home *** CD-ROM | disk | FTP | other *** search
- on decode ActionList
- global GfxChannel, SeqChannel, DVidChannel, PauseFor, AutoVidC, AutoVidX, AutoVidY, NewScreenID, CurrScreenID, AllScreen, first, ScreenID
- set PauseFor to 60
- repeat with e in ActionList
- put "current decode.." & e
- if listp(e) then
- set FBcommand to getAt(e, 1)
- if FBcommand = "NAV" then
- set AutoVidC to 0
- set NewScreenID to getAt(e, 2)
- if count(e) > 2 then
- set AutoVidX to 320
- set AutoVidY to 240
- set AutoVidC to getAt(e, 3)
- if count(e) > 3 then
- set AutoVidX to getAt(e, 4)
- set AutoVidY to getAt(e, 5)
- end if
- end if
- else
- if FBcommand = "PLAY" then
- if soundBusy(1) then
- put "Stop the music"
- repeat with k = 1 to 10
- set the volume of sound 1 to integer((10 - k) / 11.0 * 255)
- delaytime(3)
- end repeat
- sound stop 1
- sound stop 2
- end if
- set the volume of sound 1 to 255
- set locCurrScreen to CurrScreenID
- set HoldAll to AllScreen
- set DirMov to getAt(e, 2)
- set first to 1
- set ScreenID to 0
- set CurrScreenID to 0
- if count(e) > 2 then
- set FrameIn to getAt(e, 3)
- put "play frame FrameIn of movie DirMov " & FrameIn & " + " & DirMov
- else
- put "play movie DirMov " & DirMov
- puppetSound(2, 12)
- play movie DirMov
- end if
- go(1)
- else
- if (FBcommand = "GFX") or (FBcommand = "GFXP") then
- set PicC to getAt(e, 2)
- if count(e) > 2 then
- set PicX to getAt(e, 3)
- set PicY to getAt(e, 4)
- else
- set PicX to 320
- set PicY to 240
- end if
- playGfx(PicC, PicX, PicY)
- if FBcommand = "GFX" then
- resetGfx()
- end if
- else
- if FBcommand = "PAUSE" then
- set PauseFor to getAt(e, 2)
- else
- if FBcommand = "SEQ" then
- playSeq(e)
- else
- if FBcommand = "SND" then
- put "play sound button"
- set SndCast to getAt(e, 2)
- puppetSound(string(SndCast))
- else
- if FBcommand = "VID" then
- set VidC to getAt(e, 2)
- if count(e) > 2 then
- set VidX to getAt(e, 3)
- set VidY to getAt(e, 4)
- else
- set VidX to 320
- set VidY to 240
- end if
- playVideo(VidC, VidX, VidY)
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- next repeat
- end if
- if stringp(e) then
- if e = "END" then
- exit repeat
- else
- if e = "UPS" then
- updateStage()
- else
- if e = "SEQCLR" then
- resetSeq()
- else
- if e = "QUIT" then
- DePuppetAll()
- puppetSound(2, 13)
- updateStage()
- repeat while soundBusy(2)
- nothing()
- end repeat
- quit()
- exit
- else
- end if
- end if
- end if
- end if
- next repeat
- end if
- end repeat
- end
-
- on DePuppetAll
- repeat with J = 1 to 48
- puppetSprite(J, 0)
- end repeat
- end
-
- on playSeq SeqElement
- global SeqChannel, PauseFor
- set StartCast to getAt(SeqElement, 2)
- set EndCast to getAt(SeqElement, 3)
- if count(SeqElement) > 3 then
- set SeqX to getAt(SeqElement, 4)
- set SeqY to getAt(SeqElement, 5)
- else
- set SeqX to 320
- set SeqY to 240
- end if
- set the locH of sprite SeqChannel to SeqX
- set the locV of sprite SeqChannel to SeqY
- set TimeGap to PauseFor
- if StartCast < EndCast then
- repeat with M = StartCast to EndCast
- set the castNum of sprite SeqChannel to M
- updateStage()
- delaytime(TimeGap)
- end repeat
- else
- repeat with M = StartCast down to EndCast
- set the castNum of sprite SeqChannel to M
- updateStage()
- delaytime(TimeGap)
- end repeat
- end if
- end
-
- on delaytime aDelay
- set aDelay to the timer + aDelay
- repeat while the timer < aDelay
- end repeat
- end
-
- on playGfx PicCast, PicX, PicY
- global GfxChannel, PauseFor
- set the castNum of sprite GfxChannel to PicCast
- set the locH of sprite GfxChannel to PicX
- set the locV of sprite GfxChannel to PicY
- updateStage()
- startTimer()
- repeat while the timer < PauseFor
- nothing()
- end repeat
- end
-
- on playVideo VidCast, VidX, VidY
- global DVidChannel
- set the movieRate of sprite DVidChannel to 0
- set the castNum of sprite DVidChannel to VidCast
- set the locH of sprite DVidChannel to VidX
- set the locV of sprite DVidChannel to VidY
- set movLength to the duration of cast VidCast
- updateStage()
- set slip to 0
- set the movieRate of sprite DVidChannel to 1
- VideoControlsOn()
- puppetSprite(37, 1)
- puppetSprite(38, 1)
- repeat while the movieTime of sprite DVidChannel < (movLength - slip)
- set percent to 100.0 * the movieTime of sprite DVidChannel / movLength
- showProgress(percent)
- if the mouseDown then
- set c to the mouseCast
- put "Vid clicks " & c
- set BaseVidControlCast to 60
- set c to c - BaseVidControlCast
- if c = 0 then
- set the movieTime of sprite DVidChannel to 0
- else
- if c = 1 then
- set HoldVol to the volume of sprite DVidChannel
- set the volume of sprite DVidChannel to 1
- set HoldSpeed to the movieRate of sprite DVidChannel
- set the movieRate of sprite DVidChannel to -3
- repeat while the mouseDown
- set percent to 100.0 * the movieTime of sprite DVidChannel / movLength
- showProgress(percent)
- updateStage()
- end repeat
- set the volume of sprite DVidChannel to HoldVol
- set the movieRate of sprite DVidChannel to HoldSpeed
- else
- if (c = 2) or (c = 5) then
- set CurrSpeed to the movieRate of sprite DVidChannel
- if CurrSpeed then
- set the castNum of sprite 42 to BaseVidControlCast + 5
- set the movieRate of sprite DVidChannel to 0
- updateStage()
- else
- set the castNum of sprite 42 to BaseVidControlCast + 2
- set the movieRate of sprite DVidChannel to 1
- updateStage()
- end if
- repeat while the mouseDown
- end repeat
- else
- if c = 3 then
- set HoldVol to the volume of sprite DVidChannel
- set the volume of sprite DVidChannel to 1
- set HoldSpeed to the movieRate of sprite DVidChannel
- set the movieRate of sprite DVidChannel to 6
- repeat while the mouseDown
- set percent to 100.0 * the movieTime of sprite DVidChannel / movLength
- showProgress(percent)
- updateStage()
- end repeat
- set the volume of sprite DVidChannel to HoldVol
- set the movieRate of sprite DVidChannel to HoldSpeed
- else
- if c = 4 then
- exit repeat
- end if
- end if
- end if
- end if
- end if
- end if
- updateStage()
- nothing()
- end repeat
- VideoControlsOff()
- resetVideo()
- end
-
- on ShowProgress1 percent
- set the locH of sprite 38 to 620
- set the locV of sprite 38 to 480 - (percent / 100.0 * 480)
- end
-
- on showProgress percent
- set R to 6.28000000000000025 * percent / 100.0
- set x to 595 + (38 * sin(R))
- set y to 460 - (15 * cos(R))
- set the locH of sprite 38 to x
- set the locV of sprite 38 to y
- end
-
- on resetVideo
- global DVidChannel
- set the locH of sprite DVidChannel to -300
- set the locV of sprite DVidChannel to -300
- set the castNum of sprite DVidChannel to 4
- set the castNum of sprite 37 to 3
- set the castNum of sprite 38 to 3
- end
-
- on resetGfx
- global GfxChannel
- set the castNum of sprite GfxChannel to 3
- end
-
- on resetSeq
- global SeqChannel
- set the castNum of sprite SeqChannel to 3
- end
-
- on ResetRoll
- global OverChannel
- set the castNum of sprite OverChannel to 3
- end
-
- on VideoControlsOn
- global RightVis
- repeat with k = 40 to 44
- puppetSprite(k, 1)
- set the locH of sprite k to 320
- set the locV of sprite k to 240
- set the castNum of sprite k to 20 + k
- end repeat
- set RightVis to the locH of sprite 47
- set the locH of sprite 47 to 3000
- set the castNum of sprite 37 to 10
- set the castNum of sprite 38 to 11
- end
-
- on VideoControlsOff
- global RightVis
- repeat with k = 40 to 44
- set the castNum of sprite k to 3
- puppetSprite(k, 0)
- end repeat
- set the locH of sprite 47 to RightVis
- end
-